<template>
  <div id="ApplicationPage" :class="{ smallFontSize: showEdition, mediumFontSize: !showEdition }">
    <div class="content" :style="{
      height:
        this.$store.state.NowName == '改扩建'
          ? 'calc(100vh - 90px)'
          : this.$store.state.NowName == '原址翻建'
            ? 'calc(100vh - 180px)'
            : this.$store.state.NowName == '异址新建'
              ? 'calc(100vh - 180px)'
              : 'calc(100vh - 230px)',
      overflow: 'auto',
    }">
      <div v-if="!showGRSQ" class="tab">
        <ul>
          <li v-for="(item, index) in tabData" :key="index" :class="{ select: nowIndex === index }"
            @click="tabClick(index)">
            <span :class="{
              smallFontSize: showEdition,
              mediumFontSize: !showEdition,
            }">{{ item }}</span>
          </li>
        </ul>
      </div>
      <div v-if="showGRSQ" class="tab1">
        <ul>
          <li>
            <span>为工匠代办</span>
          </li>
        </ul>
      </div>
      <div v-if="nowIndex === 0 && !showGRSQ" class="list">
        <p style="color: #989898; padding: 10px 0">请核对您的身份信息</p>
        <van-form validate-first :class="{ smallFontSize: showEdition, mediumFontSize: !showEdition }">
          <div style="
                                      display: flex;
                                      justify-content: center;
                                      align-items: center;
                                      border-bottom: 1px solid #d2d2d2;
                                      color: black;
                                    ">
            <span style="color: #ff0000">*</span>
            <van-field v-model="formData.houseapplicant" :readonly="isreadonsly1" placeholder="请输入户主姓名" label="户主姓名"
              :rules="[{ required: true, message: '请填写户主姓名' }]" />
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <!-- @blur.native.capture="handleGetCityData" placeholder="身份证号码" -->
            <van-field v-model="formData.certificatecode" label="身份证号码" name="validator" :readonly="isreadonsly1"
              :rules="[{ validator, message: '请输入正确身份证号码' }]" />
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field placeholder="请输入手机号码" :readonly="isreadonsly1" v-model="formData.applyphone" label="手机号" :rules="[
              { required: true, message: '请填写您的手机号码！' },
              { pattern: /^1[3456789]\d{9}$/, message: '手机号码格式错误！' },
            ]" name="pattern" />
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field :readonly="isreadonsly1" clickable name="picker" :value="ValueCity" label="所属市"
              placeholder="请选择所属市" @click="showPickerC = true" :rules="[{ required: true, message: '请选择所属市' }]" />
            <van-popup v-model="showPickerC" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="CityColumns" value-key="cityname" @confirm="onConfirmCity"
                @cancel="showPickerC = false" />
            </van-popup>
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field :readonly="isreadonsly1" clickable name="picker" :value="valueXian" label="所属县(区)"
              placeholder="请选择所属县(区)" @click="showPickerX = true" />
            <van-popup v-model="showPickerX" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="XianColumns" value-key="cityname" @confirm="onConfirmXian"
                @cancel="showPickerX = false" />
            </van-popup>
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field :readonly="isreadonsly1" clickable name="picker" :value="valueZhen" label="所属镇"
              placeholder="请选择所属镇" @click="showPickerT = true" />
            <van-popup v-model="showPickerT" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="TownColumns" value-key="cityname" @confirm="onConfirmTown"
                @cancel="showPickerT = false" />
            </van-popup>
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field :readonly="isreadonsly1" clickable name="picker" :value="valueCun" label="所属村" placeholder="请选择所属村"
              @click="showPickerCun = true" />
            <van-popup v-model="showPickerCun" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="CunColumns" value-key="cityname" @confirm="onConfirmCun"
                @cancel="showPickerCun = false" />
            </van-popup>
          </div>
          <!-- <div v-if="parentName" style="display: flex;justify-content: center;align-items: center;border-bottom: 1px solid #D2D2D2;">
                  <span style="color: #FF0000;">*</span>
                  <van-field v-model="buildtype" label="建房类型" name="validator" />
                </div>-->
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field :readonly="isreadonsly1" clickable name="picker" :value="buildtype" label="建房类型"
              placeholder="请选择建房类型" @click="this.$store.state.NowName ? '' : (showPickerBT = true)" />
            <van-popup v-model="showPickerBT" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="BUILDTYPEcolumns" value-key="enumname" @confirm="onConfirmBUILDTYPE"
                @cancel="showPickerBT = false" />
            </van-popup>
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field v-model="formData.cnyf" rows="3" autosize label="承诺书时间" type="number"
              placeholder="请输入承诺书时间(月)" />
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field :readonly="isreadonsly1" clickable name="picker" :value="formData.buildreason" label="建房理由"
              placeholder="请选择建房理由" @click="showPickerJFLY = true" />
            <van-popup v-model="showPickerJFLY" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="JFLYcolumns" value-key="enumname" @confirm="onConfirmJFLY"
                @cancel="showPickerJFLY = false" />
            </van-popup>
          </div>
          <div v-show="formData.buildreason == '其他'"
            style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <van-field v-model="formData.buildreason_qt" rows="3" autosize label type="textarea"
              placeholder="请输入具体建房理由" />
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field :readonly="isreadonsly1" clickable name="picker" :value="If_ljf" label="是否联建" placeholder="请选择是否联建"
              @click="showPicker = true" />
            <van-popup v-model="showPicker" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="columns1" value-key="enumname" @confirm="onConfirm"
                @cancel="showPicker = false" />
            </van-popup>
          </div>
        </van-form>
        <div v-if="IsLG === '是'">
          <div style="margin: 15px 0">
            <van-button type="info" size="small" @click="freeAdd">新增</van-button>
            <van-button type="info" size="small" @click="haddleEdit">修改</van-button>
            <van-button type="info" size="small" @click="handleDelete">删除</van-button>
          </div>
          <div>
            <el-table :header-cell-style="{ color: '#000' }" :data="tableData" border size="mini" style="width: 100%"
              @selection-change="handleSelectionChange">
              <el-table-column type="selection" width="40"></el-table-column>
              <el-table-column type="index" label="序号" align="center" width="45"></el-table-column>
              <el-table-column width="70px" prop="XM" align="center" label="姓名"></el-table-column>
              <el-table-column min-width="145px" prop="SFZH" align="center" label="身份证号"></el-table-column>
              <el-table-column width="95px" prop="phone" align="center" label="联系电话"></el-table-column>
              <!-- <el-table-column prop="sexx" align="center" label="性别"> -->
              <!-- </el-table-column> -->
              <!-- <el-table-column prop="JTZZ" align="center" label="家庭住址"> -->
              <!-- </el-table-column> -->
            </el-table>
          </div>
        </div>
      </div>
      <div v-if="nowIndex === 1 && !showGRSQ" class="list">
        <p style="color: #5d5d5d; padding: 10px 0">
          <span style="color: #ff0000">*</span>
          请拍摄并上传被代办人的有效身份证
        </p>
        <div>
          <div style="width: 50%; float: left; text-align: center">
            <van-uploader v-model="fileList"
              accept="image/jpeg, image/png, image/jpg, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, application/pdf"
              :after-read="afterRead" :before-delete="delectFile" :max-count="1">
              <template default>
                <img src="https://nfzjszlb.jst.zj.gov.cn/serverfile/zheliban/icon/ZLJ/positive0.png" width="150"
                  alt="" />
              </template>
            </van-uploader>
            <p :style="{ fontSize: showEdition ? '12px' : '14px' }">点击上传带头像的一面</p>
          </div>
          <div style="width: 50%; float: left; text-align: center">
            <van-uploader v-model="fileList1"
              accept="image/jpeg, image/png, image/jpg, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, application/pdf"
              :after-read="afterRead1" :before-delete="delectFile" :max-count="1">
              <template default>
                <img src="https://nfzjszlb.jst.zj.gov.cn/serverfile/zheliban/icon/ZLJ/positive1.png" width="150"
                  alt="" />
              </template>
            </van-uploader>
            <p :style="{ fontSize: showEdition ? '12px' : '14px' }">点击上传带国徽的一面</p>
          </div>
        </div>
        <div style="clear: both"></div>
        <van-form validate-first :class="{ smallFontSize: showEdition, mediumFontSize: !showEdition }">
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field v-model="formDataTR.houseapplicant" label="户主姓名" placeholder="请输入户主姓名"
              :rules="[{ required: true, message: '请填写户主姓名' }]" />
          </div>
          <!-- @blur.native.capture="handleGetCityData" -->
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field v-model="formDataTR.certificatecode" label="身份证号码" placeholder="请输入身份证号码" name="validator"
              :rules="[{ validator, message: '请输入正确身份证号码' }]" />
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field v-model="formDataTR.cnyf" rows="3" autosize label="承诺书时间" type="number"
              placeholder="请输入承诺书时间(月)" />
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field :readonly="isreadonsly1" clickable name="picker" :value="ValueCity1" label="所属市"
              placeholder="请选择所属市" @click="showPickerC = true" />
            <van-popup v-model="showPickerC" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="CityColumns" value-key="cityname" @confirm="onConfirmCity1"
                @cancel="showPickerC = false" />
            </van-popup>
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field :readonly="isreadonsly1" clickable name="picker" :value="valueXian1" label="所属县(区)"
              placeholder="请选择所属县(区)" @click="showPickerX = true" />
            <van-popup v-model="showPickerX" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="XianColumns" value-key="cityname" @confirm="onConfirmXian1"
                @cancel="showPickerX = false" />
            </van-popup>
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field :readonly="isreadonsly1" clickable name="picker" :value="valueZhen1" label="所属镇"
              placeholder="请选择所属镇" @click="showPickerT = true" />
            <van-popup v-model="showPickerT" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="TownColumns" value-key="cityname" @confirm="onConfirmTown1"
                @cancel="showPickerT = false" />
            </van-popup>
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field :readonly="isreadonsly1" clickable name="picker" :value="valueCun1" label="所属村"
              placeholder="请选择所属村" @click="showPickerCun = true" />
            <van-popup v-model="showPickerCun" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="CunColumns" value-key="cityname" @confirm="onConfirmCun1"
                @cancel="showPickerCun = false" />
            </van-popup>
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <!-- <span style="color: #ff0000">*</span> -->
            <van-field v-model="formDataTR.applyphone" label="户主手机号"  placeholder="请输入户主手机号" name="pattern" />
          </div>
          <!-- <div style="display: flex;justify-content: center;align-items: center;">
                  <span style="color: #FF0000;">*</span>
                  <van-field v-model="formDataTR." label="户籍地址"  placeholder="请输入户籍地址" />
                </div>-->
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field :readonly="isreadonsly1" clickable name="picker" :value="buildtype1" label="建房类型"
              placeholder="请选择建房类型" @click="this.$store.state.NowName ? '' : (showPickerBT = true)" />
            <van-popup v-model="showPickerBT" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="BUILDTYPEcolumns" value-key="enumname" @confirm="onConfirmBUILDTYPE1"
                @cancel="showPickerBT = false" />idCard
            </van-popup>
          </div>

          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field :readonly="isreadonsly1" clickable name="picker" :value="formDataTR.buildreason" label="建房理由"
              placeholder="请选择建房理由" @click="showPickerJFLY1 = true" />
            <van-popup v-model="showPickerJFLY1" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="JFLYcolumns" value-key="enumname" @confirm="onConfirmJFLY1"
                @cancel="showPickerJFLY1 = false" />
            </van-popup>
          </div>
          <div v-show="formDataTR.buildreason == '其他'"
            style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <van-field v-model="formDataTR.buildreason_qt" rows="3" autosize label type="textarea"
              placeholder="请输入具体建房理由" />
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field :readonly="isreadonsly1" v-model="formDataTR.DBRXM" label="代办人姓名" placeholder="请填写代办人姓名"
              :rules="[{ required: true, message: '请填写代办人姓名' }]" />
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field v-model="formDataTR.dbrsjh" :readonly="isreadonsly1" label="代办人联系电话" placeholder="请输入代办人联系电话"
              :rules="[
                { required: true, message: '请填写代办人联系电话！' },
                { pattern: /^1[3456789]\d{9}$/, message: '联系电话格式错误！' },
              ]" name="pattern" />
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field v-model="formDataTR.dbrsfzh" label="代办人身份证号" :readonly="isreadonsly1" placeholder="请输入代办人身份证号"
              name="validator" :rules="[{ validator, message: '请输入正确身份证号码' }]" />
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field :readonly="isreadonsly1" clickable name="picker" :value="If_ljf1" label="是否联建"
              placeholder="请选择是否联建" @click="showPicker1 = true" />
            <van-popup v-model="showPicker1" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="columns1" value-key="enumname" @confirm="onConfirm1"
                @cancel="showPicker1 = false" />
            </van-popup>
          </div>
        </van-form>
        <div v-if="If_ljf1 === '是'">
          <div style="margin: 15px 0">
            <van-button type="info" size="small" @click="freeAdd1">新增</van-button>
            <van-button type="info" size="small" @click="haddleEdit1">修改</van-button>
            <van-button type="info" size="small" @click="handleDelete1">删除</van-button>
          </div>
          <div>
            <el-table :header-cell-style="{ color: '#000' }" :data="tableData1" border size="mini" style="width: 100%"
              @selection-change="handleSelectionChange1">
              <el-table-column type="selection" width="40"></el-table-column>
              <el-table-column type="index" label="序号" align="center" width="45"></el-table-column>
              <el-table-column width="70" prop="XM" align="center" label="姓名"></el-table-column>
              <el-table-column min-width="145px" prop="SFZH" align="center" label="身份证号"></el-table-column>
              <el-table-column width="95px" prop="phone" align="center" label="联系电话"></el-table-column>
              <!-- <el-table-column prop="sexx" align="center" label="性别"> -->
              <!-- </el-table-column> -->
              <!-- <el-table-column prop="JTZZ" align="center" label="家庭住址"> -->
              <!-- </el-table-column> -->
            </el-table>
          </div>
        </div>
        <p style="color: #5d5d5d; padding: 10px 0">
          <span style="color: #ff0000"></span>
          农户本人手持身份证照片
        </p>
        <div>
          <div style="width: 50%; float: left; text-align: center">
            <van-uploader v-model="fileListnh"
              accept="image/jpeg, image/png, image/jpg, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, application/pdf"
              :after-read="afterReadnh" :max-count="1">
              <template default>
                <img src="https://nfzjszlb.jst.zj.gov.cn/serverfile/zheliban/icon/ZLJ/positive0.png" width="180"
                  alt="" />
              </template>
            </van-uploader>
            <!-- <p :style="{ fontSize: showEdition ? '12px' : '14px' }">
                    点击上传带头像的一面
                  </p> -->
          </div>
        </div>
      </div>
      <div v-if="showGRSQ" class="list">
        <p style="color: #5d5d5d; padding: 10px 0">
          <span style="color: #ff0000">*</span>
          请拍摄并上传被代办人的有效身份证
        </p>
        <div>
          <div style="width: 50%; float: left; text-align: center">
            <van-uploader v-model="fileList"
              accept="image/jpeg, image/png, image/jpg, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, application/pdf"
              :after-read="afterRead" :before-delete="delectFile" :max-count="1">
              <template default>
                <img src="https://nfzjszlb.jst.zj.gov.cn/serverfile/zheliban/icon/ZLJ/positive0.png" width="180"
                  alt="" />
              </template>
            </van-uploader>
            <p :style="{ fontSize: showEdition ? '12px' : '14px' }">点击上传带头像的一面</p>
          </div>
          <div style="width: 50%; float: left; text-align: center">
            <van-uploader v-model="fileList1"
              accept="image/jpeg, image/png, image/jpg, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, application/pdf"
              :after-read="afterRead1" :before-delete="delectFile" :max-count="1">
              <template default>
                <img src="https://nfzjszlb.jst.zj.gov.cn/serverfile/zheliban/icon/ZLJ/positive1.png" width="180"
                  alt="" />
              </template>
            </van-uploader>
            <p :style="{ fontSize: showEdition ? '12px' : '14px' }">点击上传带国徽的一面</p>
          </div>
        </div>
        <div style="clear: both"></div>
        <van-form validate-first :class="{ smallFontSize: showEdition, mediumFontSize: !showEdition }">
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field v-model="formDataGJ.GJXM" label="工匠姓名" placeholder="请填写工匠姓名"
              :rules="[{ required: true, message: '请填写工匠姓名' }]" />
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field v-model="formDataGJ.GJSJH" label="工匠联系电话" placeholder="请输入工匠联系电话" :rules="[
              { required: true, message: '请填写工匠联系电话！' },
              { pattern: /^1[3456789]\d{9}$/, message: '联系电话格式错误！' },
            ]" name="pattern" />
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field v-model="formDataGJ.GJZJH" label="工匠身份证号" placeholder="请输入工匠身份证号" name="validator"
              :rules="[{ validator, message: '请输入正确身份证号码' }]" />
          </div>
          <!-- <div style="display: flex;justify-content: center;align-items: center;border-bottom: 1px solid #D2D2D2;">
                  <span style="color: #FF0000;">*</span>
                  <van-field
                    v-model="formDataTR.houseapplicant"
                    label="户主姓名"
                    placeholder="请输入户主姓名"
                    :rules="[{ required: true, message: '请填写户主姓名' }]"
                  />
                </div>
                 <div style="display: flex;justify-content: center;align-items: center;border-bottom: 1px solid #D2D2D2;">
                  <span style="color: #FF0000;">*</span>
                  <van-field v-model="formDataTR.applyphone" label="户主手机号" placeholder="请输入户主手机号" name="pattern" />
                </div>
                <div style="display: flex;justify-content: center;align-items: center;border-bottom: 1px solid #D2D2D2;">
                  <span style="color: #FF0000;">*</span>
                  <van-field
                    v-model="formDataTR.certificatecode"
                    label="户主身份证号码"
                    placeholder="请输入户主身份证号码"
                    name="validator"
                    @blur.native.capture="handleGetCityData"
                    :rules="[{ validator, message: '请输入正确身份证号码' }]"
                  />
                </div> -->
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field :readonly="isreadonsly1" clickable name="picker" :value="ValueCity1" label="所属市"
              placeholder="请选择所属市" @click="showPickerC = true" />
            <van-popup v-model="showPickerC" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="CityColumns" value-key="cityname" @confirm="onConfirmCity1"
                @cancel="showPickerC = false" />
            </van-popup>
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field :readonly="isreadonsly1" clickable name="picker" :value="valueXian1" label="所属县(区)"
              placeholder="请选择所属县(区)" @click="showPickerX = true" />
            <van-popup v-model="showPickerX" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="XianColumns" value-key="cityname" @confirm="onConfirmXian1"
                @cancel="showPickerX = false" />
            </van-popup>
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field :readonly="isreadonsly1" clickable name="picker" :value="valueZhen1" label="所属镇"
              placeholder="请选择所属镇" @click="showPickerT = true" />
            <van-popup v-model="showPickerT" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="TownColumns" value-key="cityname" @confirm="onConfirmTown1"
                @cancel="showPickerT = false" />
            </van-popup>
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field :readonly="isreadonsly1" clickable name="picker" :value="valueCun1" label="所属村"
              placeholder="请选择所属村" @click="showPickerCun = true" />
            <van-popup v-model="showPickerCun" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="CunColumns" value-key="cityname" @confirm="onConfirmCun1"
                @cancel="showPickerCun = false" />
            </van-popup>
          </div>
          <!-- <div style="display: flex;justify-content: center;align-items: center;">
                  <span style="color: #FF0000;">*</span>
                  <van-field v-model="formDataTR." label="户籍地址"  placeholder="请输入户籍地址" />
                </div>-->

          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field :readonly="isreadonsly1" v-model="formDataGJ.GJDBRXM" label="代办人姓名" placeholder="请填写代办人姓名"
              :rules="[{ required: true, message: '请填写代办人姓名' }]" />
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field v-model="formDataGJ.GJDBRLXDH" :readonly="isreadonsly1" label="代办人联系电话" placeholder="请输入代办人联系电话"
              :rules="[
                { required: true, message: '请填写代办人联系电话！' },
                { pattern: /^1[3456789]\d{9}$/, message: '联系电话格式错误！' },
              ]" name="pattern" />
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2">
            <span style="color: #ff0000">*</span>
            <van-field v-model="formDataGJ.GJDBRZJH" :readonly="isreadonsly1" label="代办人身份证号" placeholder="请输入代办人身份证号"
              name="validator" :rules="[{ validator, message: '请输入正确身份证号码' }]" />
          </div>
        </van-form>
        <div v-if="If_ljf1 === '是'">
          <div style="margin: 15px 0">
            <van-button type="info" size="small" @click="freeAdd1">新增</van-button>
            <van-button type="info" size="small" @click="haddleEdit1">修改</van-button>
            <van-button type="info" size="small" @click="handleDelete1">删除</van-button>
          </div>
          <div>
            <el-table :header-cell-style="{ color: '#000' }" :data="tableData1" border size="mini" style="width: 100%"
              @selection-change="handleSelectionChange1">
              <el-table-column type="selection" width="40"></el-table-column>
              <el-table-column type="index" label="序号" align="center" width="45"></el-table-column>
              <el-table-column width="70" prop="XM" align="center" label="姓名"></el-table-column>
              <el-table-column min-width="145px" prop="SFZH" align="center" label="身份证号"></el-table-column>
              <el-table-column width="95px" prop="phone" align="center" label="联系电话"></el-table-column>
              <!-- <el-table-column prop="sexx" align="center" label="性别"> -->
              <!-- </el-table-column> -->
              <!-- <el-table-column prop="JTZZ" align="center" label="家庭住址"> -->
              <!-- </el-table-column> -->
            </el-table>
          </div>
        </div>
      </div>
    </div>
    <div style="padding: 10px" v-if="this.$store.state.NowName != '改扩建'">
      <p style="color: #f95050; margin-bottom: 5px; font-weight: 500">建房类型说明</p>
      <p v-if="this.$store.state.NowName != '异址新建'">原址翻建：利用原宅基地翻建房屋</p>
      <p v-if="this.$store.state.NowName != '原址翻建'">异址新建：利用新宅基地建设新房，需先落实新宅基地</p>
      <!-- <p style="color: #F95050;margin-bottom: 5px;margin-top: 20px;font-weight: 500">
              建房理由说明
            </p>
            <p>
              1）分户新建/无房新建：对应建房类型为异址新建
            </p>
            <p>
              2）危房翻建：对应房屋类型可以是原址翻建，也可以是异址新建
            </p>
            <p>
              3）按照规划迁址新建住房：对应建房类型为异址新建
            </p>-->
    </div>
    <div :style="{
      position: this.$store.state.NowName == '改扩建' ? 'fixed' : '',
      bottom: this.$store.state.NowName == '改扩建' ? '0px' : '',
      width: '99.5%',
    }">
      <div :style="{ fontSize: showEdition ? '12px' : '14px' }" class="bottomText">
        请确保资料真实有效，我们会第一时间受理您的建房申请
      </div>
      <el-button v-if="showGRSQ" class="bottomBtn" @click="SaveGJ">保存</el-button>
      <el-button v-else class="bottomBtn" @click="getProcedure" v-preventReClick="7000">下一步</el-button>
    </div>

    <van-dialog v-model="showDialog" :title="dialogTitle" show-cancel-button @confirm="saveBtn" @cancel="cancelBtn">
      <van-form validate-first :class="{ smallFontSize: showEdition, mediumFontSize: !showEdition }">
        <div style="padding: 10px">
          <div style="
                                      display: flex;
                                      justify-content: center;
                                      align-items: center;
                                      border-bottom: 1px solid #d2d2d2;
                                      color: black;
                                    ">
            <span style="color: #ff0000">*</span>
            <van-field v-model="tableFrom.XM" label="姓名" placeholder />
          </div>
          <div style="
                                      display: flex;
                                      justify-content: center;
                                      align-items: center;
                                      border-bottom: 1px solid #d2d2d2;
                                      color: black;
                                    ">
            <span style="color: #ff0000">*</span>
            <van-field name="validator" :rules="[{ validator, message: '请输入正确身份证号码' }]" v-model="tableFrom.SFZH"
              label="身份证号" placeholder />
          </div>
          <!-- <van-field v-model="tableFrom.sexx" label="性别" placeholder="" /> -->
          <div style="display: flex; justify-content: center; align-items: center">
            <span style="color: #ff0000">*</span>
            <van-field :rules="[
              { required: true, message: '请填写您的手机号码！' },
              { pattern: /^1[3456789]\d{9}$/, message: '手机号码格式错误！' },
            ]" v-model="tableFrom.phone" label="联系电话" placeholder />
          </div>
          <!-- <van-field v-model="tableFrom.JTZZ" label="家庭地址" placeholder="" /> -->
        </div>
      </van-form>
    </van-dialog>
    <van-popup v-model="showList" style="height: 80%; width: 80%" get-container="#popup">
      <ListGJ />
    </van-popup>
  </div>
</template>
<script>
import {
  QuerySignCallback,
  InsertDataView,
  PrepareCreateProcess,
  FileServerProxy,
  CreateProcess,
  PlatSendTask,
  getRegister1,
  getSystemCityCode,
  dataTransFile,
  JFDataList,
  debounce,
  dataTransFilePreview,
  getDatalistForTree,
  getDataEnumByGroupName,
  numGenerateGetNum,
  existHouse,
} from '@/utils/api'
import { GJDBFunction1 ,GJDBFunction3} from '../../utils/queryData'
import ListGJ from './ListGJ.vue'
import Pubsub from 'pubsub-js'
import { v4 as uuidv4 } from 'uuid'
import { idCard } from '@/utils/idCard'
export default {
  data() {
    let self = this
    return {
      parentName: '',
      showList: false,
      showGRSQ: true,
      showEdition: false,
      showPickerJFLY: false,
      //控制网页端可以自动填写
      isreadonsly1: false,
      showPickerJFLY1: false,
      ISshowNow: false,
      phone: window.localStorage.getItem('DanDianPhone')
        ? self.plusXing(window.localStorage.getItem('DanDianPhone'), 3, 5)
        : '',
      idCard: window.localStorage.getItem('DanDianid')
        ? self.plusXing(window.localStorage.getItem('DanDianid'), 6, 8)
        : '',
      username: '',
      fileList: [],
      fileList1: [],
      fileListnh: [],
      tableData1: [],
      tableFrom: {
        XM: '',
        SFZH: '',
        sexx: '',
        phone: '',
        JTZZ: '',
        To_row_guid: '',
      },
      ValueCity: '',
      valueXian: '',
      valueZhen: '',
      valueCun: '',
      buildtype: '',
      If_ljf: '',
      ValueCity1: '',
      valueXian1: '',
      valueZhen1: '',
      valueCun1: '',
      ValueCity2: '',
      valueXian2: '',
      valueZhen2: '',
      valueCun2: '',
      ValueCity3: '',
      valueXian3: '',
      valueZhen3: '',
      valueCun3: '',
      buildtype1: '',
      If_ljf1: '',
      nowIndex: 0,
      dialogTitle: '',
      showDialog: false,
      scsfzFile: '',//用于记录没上传成功的文件
      scsfz1File: "",
      scsfz0File: "",
      shangchuanS: false,
      text: '',
      IsLG: '',
      formData: {
        houseapplicant: window.localStorage.getItem('DanDianName')
          ? self.plusXing(window.localStorage.getItem('DanDianName'), 0, 0)
          : '',
        certificatecode: window.localStorage.getItem('DanDianid')
          ? self.plusXing(window.localStorage.getItem('DanDianid'), 6, 8)
          : '',
        applyphone: window.localStorage.getItem('DanDianPhone')
          ? self.plusXing(window.localStorage.getItem('DanDianPhone'), 3, 5)
          : '',
        S: '',
        X: '',
        town: '',
        CUN: '',
        If_ljf: '',
        buildtype: '',
        buildreason: '',
        buildreason_qt: '',
        cnyf:"24"
      },
      formDataTR: {
        DBRXM: window.localStorage.getItem('DanDianName')
          ? self.plusXing(window.localStorage.getItem('DanDianName'), 0, 1)
          : '',
        dbrsjh: window.localStorage.getItem('DanDianPhone')
          ? self.plusXing(window.localStorage.getItem('DanDianPhone'), 3, 5)
          : '',
        dbrsfzh: window.localStorage.getItem('DanDianid')
          ? self.plusXing(window.localStorage.getItem('DanDianid'), 6, 8)
          : '',
        houseapplicant: '',
        certificatecode: '',
        applyphone: '',
        S: '',
        X: '',
        town: '',
        CUN: '',
        If_ljf: '',
        buildtype: '',
        buildreason: '',
        buildreason_qt: '',
        cnyf:'24'
      },
      formDataGJ: {
        GJDBRXM: window.localStorage.getItem('DanDianName')
          ? self.plusXing(window.localStorage.getItem('DanDianName'), 0, 0)
          : '',
        GJDBRLXDH: window.localStorage.getItem('DanDianPhone')
          ? self.plusXing(window.localStorage.getItem('DanDianPhone'), 3, 5)
          : '',
        GJDBRZJH: window.localStorage.getItem('DanDianid')
          ? self.plusXing(window.localStorage.getItem('DanDianid'), 6, 8)
          : '',
        houseapplicant: '',
        certificatecode: '',
        applyphone: '',
        GJXM: '',
        GJZJH: '',
        GJSJH: '',
        SCITY: '',
        XCITY: '',
        ZCITY: '',
        CCITY: '',
        If_ljf: '',
        buildtype: '',
        buildreason: '',
        buildreason_qt: '',
        cnyf:''
      },
      FJData: [
        {
          title: '带头像的一面',
          FileName: [],
          groupGuid: '19902700-f952-4561-a338-5590056dab65',
          fileList: [],
        },
        {
          title: '带国徽的一面',
          FileName: [],
          groupGuid: 'd26fd8fd-0d8a-46ec-af9f-2341ba78fb58',
          fileList: [],
        },
        {
          title: '农户手持照片',
          FileName: [],
          groupGuid: '85f99afa-f0c4-4064-b7a3-84eb417bc43a',
          fileList: [],
        },
      ],
      isTable: false,
      Canshu: 0,
      isGOTo: false,
      isGOTo1: false,
      sendData: [],
      value: '',
      JFLYcolumns: [],
      columns1: ['是', '否'],
      showPicker: false,
      tabData: ['本人申请', '为他人代办'],
      tableData: [],
      showPicker1: false,
      CityColumns: [],
      showPickerC: false,
      cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
      XianColumns: [],
      showPickerX: false,
      TownColumns: [],
      showPickerT: false,
      isTable: false,
      CunColumns: [],
      showPickerCun: false,
      BUILDTYPEcolumns: [],
      showPickerBT: false,
      addNum: 0, //  0本人已提交的，1 他人代办中的
      multipleSelection: [],
      multipleSelection1: [],
    }
  },
  watch: {
    // certificatecode: {
    //   deep: true,
    //   immediate: true,
    //   parentName: '',
    // },
  },
  components: {
    ListGJ,
  },
  mounted() {
    this.showGRSQ = window.sessionStorage.getItem('ISGJDB') == 'true' ? true : false
    Pubsub.subscribe('SaveData', (msg, data) => { })
    let uuid = uuidv4()
    let formData1 = {
      row_guid: uuid,
    }
    this.$store.commit('gettoGuid', formData1)
    this.parentName = this.$route.query.name
    this.buildtype = this.$route.query.name
    this.showEdition = this.$store.state.Edition
    //判断是不是退件信息  需要让农户重新根据退件原因调整数据
    if (this.$route.query.data) {
      let data = JSON.parse(this.$route.query.data)
      if (data.SQFS == 36) {
        this.nowIndex = 1
        this.formDataTR.S = data.S
        this.formDataTR.X = data.X
        this.formDataTR.S = data.S
        this.formDataTR.If_ljf = data.IF_LJF
        this.formDataTR.buildreason = data.BUILDREASON
        this.formDataTR.applyphone = data.APPLYPHONE
        this.formDataTR.houseapplicant = data.HOUSEAPPLICANT
        this.formDataTR.certificatecode = data.CERTIFICATECODE
        this.formDataTR.town = data.TOWN
        this.formDataTR.CUN = data.CUN
        this.getFile1()
        // this.formData.S = data.S
      } else {
        this.nowIndex = 0
        this.formData.S = data.S
        this.formData.X = data.X
        this.formData.town = data.TOWN
        this.formData.CUN = data.CUN
        this.formData.buildreason = data.BUILDREASON
        this.formData.If_ljf = data.IF_LJF
        this.getFile1()
      }
    }
    this.getCityOpenDataView()
    this.getJFLYOpenDataView()
    this.getBUILDTYPEcolumns()
    this.getcolumns1()
    setTimeout(() => {
      this.BUILDTYPEcolumns.forEach((item, index) => {
        if (this.buildtype == item.enumname) {
          this.formData.buildtype = item.enumvalue
          this.buildtype1 = item.enumname
          this.formDataTR.buildtype = item.enumvalue
        }
      })
    }, 2000)
    if (this.showEdition) {
      $('#ApplicationPage .van-field__control').css('fontSize', '16px !important')
      $('#ApplicationPage .van-cell').css('fontSize', '16px !important')
    } else {
      $('#ApplicationPage .van-field__control').css('fontSize', '20px !important')
      $('#ApplicationPage .van-cell').css('fontSize', '20px !important')
    }
    if (ZWJSBridge) {
      this.isreadonsly1 = true
      ZWJSBridge.setTitle({
        title: '申请',
      })
        .then((res) => { })
        .catch((err) => {
          this.isreadonsly1 = false
        })
    } else {
      this.isreadonsly1 = false
    }
  },
  methods: {
    validator(val) {
      var idcardReg =
        /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/
      return idcardReg.test(val)
    },
    afterRead(file) {
      // 此时可以自行将文件上传至服务器
      //   ZWJSBridge.chooseImage({
      //     "upload": true
      //   }).then(res => {
      this.scsfz0File = file.file
      this.getFileServerUpload(file.file, '0')
      //   }).catch(err => {
      //   })
      // this.getFileServerUpload(file.file)
    },
    onFileChange(e) {
      let file = e.target.files[0]
      //对文件检查
      let allType = 'image/png,image/gif,image/jpeg,image/jpg,image/svg'
      if (allType.indexOf(file.type) == '-1') {
        this.$vux.toast.text('请选择图片文件')
        return false
      }
      this.$vux.loading.show()

      let param = new FormData() //创建form对象
      param.append('file', file) //通过append向form对象添加数据
      //这里的param已经是一个文件流了 但是我想压缩下图片再上传 如果不需要压缩 可以直接接口上传
      this.imgPreview(file)
    },
    // canvas压缩图片
    compress(img) {
      let canvas = document.createElement('canvas')
      let ctx = canvas.getContext('2d')
      let initSize = img.src.length
      let width = img.width
      let height = img.height
      canvas.width = width
      canvas.height = height
      // 铺底色
      ctx.fillStyle = '#fff'
      ctx.fillRect(0, 0, canvas.width, canvas.height)
      ctx.drawImage(img, 0, 0, width, height)
      console.log(initSize)
      //进行最小压缩
      let ndata = canvas.toDataURL('image/jpeg', 0.2) //这个0.2是可变的 数值越小 压缩的越厉害 很小图会失真 0.2还是可以接受的
      console.log('*******压缩后的图片大小*******', ndata.length)
      return ndata
    },
    //压缩后的图片再转换成文件
    dataURLtoFile(dataurl, filename = 'file') {
      let arr = dataurl.split(',')
      let mime = arr[0].match(/:(.*?);/)[1]
      let suffix = mime.split('/')[1]
      let bstr = atob(arr[1])
      let n = bstr.length
      let u8arr = new Uint8Array(n)
      while (n--) {
        u8arr[n] = bstr.charCodeAt(n)
      }
      return new File([u8arr], `${filename}.${suffix}`, { type: mime })
    },
    //上传文件
    imgPreview(file) {
      let that = this
      // 判断是否支持FileReader
      if (!file || !window.FileReader) return
      // 创建一个reader
      var reader = new FileReader()
      // 将图片转成base64格式
      reader.readAsDataURL(file)
      // 读取成功后的回调
      reader.onloadend = function () {
        let result = this.result
        let img = new Image()
        img.src = result
        // console.log("============未压缩图片===========");
        // console.log(result.length);

        img.onload = function () {
          let data = that.compress(img) //压缩
          // console.log(data.length);
          that.imgUrl = result
          var formData = new FormData()

          let a = that.dataURLtoFile(data) //压缩后转换成文件
          let param = new FormData() //创建form对象
          param.append('file', a) //通过append向form对象添加数据
          // return;
          let config = {
            headers: { 'Content-Type': 'multipart/form-data' },
          }
          //$http是封装的Axios
          that.$http
            .post('common/oss/upload', param, config)
            .then((res) => {
              if ((res.data.code = 200)) {
                that.localIdImgs.push(res.data.data.url) //上传成功会返回图片链接
              }
              that.$vux.loading.hide()
            })
            .catch((err) => {
              that.$vux.loading.hide()
            })
        }
      }
    },
    //获取相关材料
    getFile1: async function () {
      let me = this
      // let groupGuid = []
      // this.FJData.forEach((item) => {
      //   groupGuid.push(item.groupGuid)
      // })
      let params = {
        accessCode: '1fdcbce42c6d4748a020feba618d54b8',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: {
          groupGuid: '19902700-f952-4561-a338-5590056dab65,d26fd8fd-0d8a-46ec-af9f-2341ba78fb58,85f99afa-f0c4-4064-b7a3-84eb417bc43a',
          toRowGuid: JSON.parse(this.$route.query.data).ROW_GUID,
          token: window.localStorage.getItem('token'),
        },
      }
      const res1 = await FileServerProxy(params)
      let ress = JSON.parse(res1.data.data)
      if (ress.FilesInfo && ress.FilesInfo.length > 0) {
        ress.FilesInfo.forEach((element) => {
          this.FJData.forEach((item) => {
            if (element.GROUPGUID == item.groupGuid) {
              element['file'] = {
                name: element.FILENAME,
              }
              this.getFileUrl(element, item)
            }
          })
        })
      }
      console.log(this.FJData, 'dnfue ufeifn');
    },
    //获取附件文件流
    getFileUrl: async function (element, item) {
      let formData = new FormData()
      formData.append('accessCode', '98bcf528966e48ce896a8b3fd02d45d5')
      formData.append(
        'cityCode',
        window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000'
      )
      formData.append(
        'paramStr',
        JSON.stringify({
          fileGuid: element.ROW_GUID,
        })
      )
      let response = await dataTransFilePreview(formData)
      console.log(response, 'hezhilong')
      if (response) {
        var img = new Blob([new Int8Array(response.data, 0)], {
          type: response.headers['content-type'],
        }) //type类型可自定义
        element['isImage'] = true
        console.log(img, 'hezhilong')
        element['url'] = window.URL.createObjectURL(img)
        //生成的url只能访问一次
        console.log(element, 'xiaohe')
        if (element.FILETYPE == '.pdf') {
          item.FileName.push(element)
        } else {
          item.fileList.push(element)
          debugger
          if (element.GROUPGUID == "19902700-f952-4561-a338-5590056dab65") {
            this.fileList.push(element)
          } else if (element.GROUPGUID == "d26fd8fd-0d8a-46ec-af9f-2341ba78fb58") {
            this.fileList1.push(element)
          } else {
            this.fileListnh.push(element)
          }
        }
      }
      console.log(this.fileList, 'this.fileList')
    },
    plusXing(str, frontLen, endLen) {
      //浙里办新规则
      if (str.length < 9) {
        return '*' + str.substring(1, str.length) //截取name 字符串截取第一个字符
      } else if (str.length > 9 && str.length < 18) {
        return str.substring(0, 3) + '****' + str.substring(7, str.length) //截取第一个和大于第4个字符
      } else {
        return str.substring(0, 1) + '****************' + str.substring(str.length - 1, str.length)
      }
    },
    afterRead1(file) {
      try {
        let cmr = plus.camera.getCamera() // 获取摄像头对象
        let res = cmr.supportedImageResolutions[0] // 字符串数组，摄像头支持的拍照分辨率
        let fmt = cmr.supportedImageFormats[0] // 字符串数组，摄像头支持的拍照文件格式
        console.log('Resolution :' + res + ', Format: ' + fmt)
        cmr.captureImage(
          (path) => {
            alert('调用成功: ' + path)
          },
          (error) => {
            // 拍照操作失败的回调函数
            alert('调用失败: ' + error.message)
          },
          { resolution: res, format: fmt } // 摄像头拍照参数
        )
      } catch (e) { }
      // 此时可以自行将文件上传至服务器
      // this.getFileServerUpload(file.file)
      //   ZWJSBridge.chooseImage({
      //     "upload": true
      //   }).then(res => {
      this.scsfz1File = file.file
      this.getFileServerUpload(file.file, '1')
      //   }).catch(err => {
      //   })
    },
    afterReadnh(file) {
      this.scsfzFile = file.file
      this.getFileServerUpload(file.file, 'scsfz')
    },
    getFileServerUpload: async function (file, data) {
      let data1 = ''
      if (data == 'scsfz') {
        data1 = {
          toRowGuid: this.$store.state.toGuid.row_guid,
          groupGuid: '85f99afa-f0c4-4064-b7a3-84eb417bc43a',
          token: window.localStorage.getItem('token'),
        }
      } else {
        if (data == '1') {
          data1 = {
            toRowGuid: this.$store.state.toGuid.row_guid,
            groupGuid: 'd26fd8fd-0d8a-46ec-af9f-2341ba78fb58',
            token: window.localStorage.getItem('token'),
          }
        } else {
          data1 = {
            toRowGuid: this.$store.state.toGuid.row_guid,
            groupGuid: data == '0' ? '19902700-f952-4561-a338-5590056dab65' : 'd26fd8fd-0d8a-46ec-af9f-2341ba78fb58',
            token: window.localStorage.getItem('token'),
          }
        }
      }

      if (this.showGRSQ) {
        data1.groupGuid = '0' ? '4b8680cf-0624-418d-af39-0600596942fc' : '4dbf62bf-2238-4c86-9525-beca036b307e'
      }
      let formData = new FormData()
      formData.append('file', file)
      formData.append('accessCode', '7a3fc061c866434b8475d3775c9ddcea')
      formData.append(
        'cityCode',
        window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000'
      )
      formData.append('paramStr', JSON.stringify(data1))
      // formData.append('toRowGuid', this.$store.state.toGuid.row_guid)
      // formData.append('groupGuid', data == '0' ? '19902700-f952-4561-a338-5590056dab65' : 'd26fd8fd-0d8a-46ec-af9f-2341ba78fb58')
      // formData.append('token', window.localStorage.getItem('token'))
      const res = await dataTransFile(formData)
      let data2 = JSON.parse(res.data.data).FileList
      this.fileGuid = data2[0].FILEGUID
      if (this.fileGuid) {
        this.$toast.success('上传成功!')
        // this.$notify({ type: 'success', message: '上传成功!' });
      } else {
        this.shangchuanS = true
      }
    },
    //根据身份证查询户主户籍姓名和身份证匹配
    handleMatching: async function (data, data1) {
      let params = {
        accessCode: '4f54f932615d11ec87416805cab640a0',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',

        params: { czrkgmsfhm: data },
      }
      const res = await FileServerProxy(params)
      try {
        if (res.data.data.datas == null) {
          this.isGOTo1 = false
          this.$toast.fail('未查到当前填写的申请人姓名和身份证号码!')
        } else {
          res.data.data.datas.forEach((item) => {
            if (item.ELC_LICENCE_STRUCT.DATA.CZRKGMSFHM == data) {
              if (item.ELC_LICENCE_STRUCT.DATA.CZRKXM == data1) {
                this.isGOTo1 = true
              } else {
                this.$toast.fail('当前填写的代办申请人姓名和身份证号码不匹配!')
                this.isGOTo1 = false
              }
            }
          })
        }
      } catch (err) {
        this.isGOTo1 = true
        // this.$toast.fail('请稍后重试!')
      }
    },
    //根据身份证查询代办人户籍姓名和身份证匹配
    handleMatching1: async function (data, data1) {
      let params = {
        accessCode: '4f54f932615d11ec87416805cab640a0',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',

        params: { czrkgmsfhm: data },
      }
      const res = await FileServerProxy(params)
      try {
        if (res.data.data.datas == null) {
          this.isGOTo1 = true
          // this.$toast.fail('当前填写的代办人身份证号码暂无信息!')
        } else {
          //优化提醒
          res.data.data.datas.forEach((item) => {
            if (item.ELC_LICENCE_STRUCT.DATA.CZRKGMSFHM == data) {
              if (item.ELC_LICENCE_STRUCT.DATA.CZRKXM == data1) {
                this.isGOTo1 = true
              } else {
                this.$toast.fail('当前填写的代办人姓名和身份证号码不匹配!')
                this.isGOTo1 = false
              }
            }
          })
        }
      } catch (err) {
        // this.$toast.fail('请稍后重试!')
        this.isGOTo1 = true
      }
    },
    //根据身份证信息获取是哪个地市
    handleGetCityData: async function (data) {
      if (this.nowIndex == 0) {
        let params = {
          accessCode: '4f54f932615d11ec87416805cab640a0',
          cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',

          params: { czrkgmsfhm: this.formData.certificatecode },
        }
        const res = await FileServerProxy(params)
        //根据身份证号码查用户姓名 并根据用户姓名和当前填入的姓名匹配
        // todo

        // res.data.datas[0].DATA
        // 调用接口获取正确的信息
        if (res.data.data.datas == null) {
        } else {
          let parmes = {
            accessCode: '3b9bff397b31401ea57b35b384a94673',
            cityCode: window.localStorage.getItem('citycode')
              ? window.localStorage.getItem('citycode')
              : '441300000000',
            townName: res.data.data.datas[0].ELC_LICENCE_STRUCT.DATA.XZJD,
            fullVillageName: res.data.data.datas[0].ELC_LICENCE_STRUCT.DATA.CZRKZZ,
            townCode: res.data.data.datas[0].ELC_LICENCE_STRUCT.DATA.SSPCSJGDM,
            villageName: res.data.data.datas[0].ELC_LICENCE_STRUCT.DATA.CJWH,
          }
          const res1 = await getSystemCityCode(parmes)
          try {
            res1.data.data.forEach((item) => {
              this.ValueCity3 = item.child[0].pid
              this.ValueCity = item.child[0].cityName
              this.valueXian3 = item.child[0].child[0].pid
              this.valueXian = item.child[0].child[0].cityName
              this.valueZhen3 = item.child[0].child[0].child[0].pid
              this.valueZhen = item.child[0].child[0].child[0].cityName
              this.valueCun3 = item.child[0].child[0].child[0].child[0].pid
              this.valueCun = item.child[0].child[0].child[0].child[0].cityName
            })
          } catch (error) {
            if (this.ValueCity3 == '' || this.valueXian3 == '' || this.valueZhen3 == '' || this.valueCun3 == '') {
              this.$toast.fail('户籍地址和现有地址不匹配,请手动选择！')
              // this.$notify({ type: 'warning', message: '户籍地址和现有地址不匹配,请手动选择！' });
            }
          }
        }
      } else {
        if (!this.formDataTR.certificatecode) {
          return false
        }
        let params = {
          accessCode: '4f54f932615d11ec87416805cab640a0',
          cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',

          params: { czrkgmsfhm: this.formDataTR.certificatecode },
        }
        const res = await FileServerProxy(params)
        // res.data.datas[0].DATA
        let parmes = {
          accessCode: '',
          cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
          townName: res.data.data.datas[0].ELC_LICENCE_STRUCT.DATA.XZJD,
          fullVillageName: res.data.data.datas[0].ELC_LICENCE_STRUCT.DATA.CZRKZZ,
          townCode: res.data.data.datas[0].ELC_LICENCE_STRUCT.DATA.SSPCSJGDM,
          villageName: res.data.data.datas[0].ELC_LICENCE_STRUCT.DATA.CJWH,
        }
        const res1 = await getSystemCityCode(parmes)
        res1.data.data.forEach((item) => {
          this.ValueCity3 = item.child[0].pid
          this.ValueCity = item.child[0].cityName
          this.valueXian3 = item.child[0].child[0].pid
          this.valueXian = item.child[0].child[0].cityName
          this.valueZhen3 = item.child[0].child[0].child[0].pid
          this.valueZhen = item.child[0].child[0].child[0].cityName
          this.valueCun3 = item.child[0].child[0].child[0].child[0].pid
          this.valueCun = item.child[0].child[0].child[0].child[0].cityName
        })
      }
    },
    //删除
    handleDelete: function () {
      if (this.multipleSelection.length < 1) {
        this.$toast.fail('请至少选择一行数据删除')
        // this.$notify({ type: 'danger', message: '请至少选择一行数据删除' });
      } else {
        this.$dialog
          .confirm({
            title: '提示',
            message: '此操作将永久删除该信息, 是否继续?',
          })
          .then(() => {
            this.multipleSelection.forEach((item) => {
              let ids = this.tableData.forEach((ele, index) => {
                if (ele.name == item.name) {
                  return true
                }
              })
              this.tableData.splice(ids, 1)
            })
            this.$toast.success('删除成功!')
            // this.$notify({ type: 'success', message: '删除成功!' });
          })
          .catch(() => {
            this.$toast.fail('已取消删除!')
            // this.$notify({ type: 'danger', message: '已取消删除!' });
          })
      }
    },
    handleDelete1: function () {
      if (this.multipleSelection1.length < 1) {
        this.$toast.fail('请至少选择一行数据删除')
        // this.$notify({ type: 'danger', message: '请至少选择一行数据删除' });
      } else {
        this.$dialog
          .confirm({
            title: '提示',
            message: '此操作将永久删除该信息, 是否继续?',
          })
          .then(() => {
            this.multipleSelection1.forEach((item) => {
              let ids = this.tableData1.forEach((ele, index) => {
                if (ele.name == item.name) {
                  return true
                }
              })
              this.tableData1.splice(ids, 1)
            })
            this.$toast.success('删除成功!')
            // this.$notify({ type: 'success', message: '删除成功!' });
          })
          .catch(() => {
            this.$toast.fail('已取消删除!')
            // this.$notify({ type: 'danger', message: '已取消删除!' });
          })
      }
    },
    handleSelectionChange(val) {
      this.multipleSelection = val
    },
    handleSelectionChange1(val) {
      this.multipleSelection1 = val
    },
    freeAdd() {
      this.showDialog = true
      this.dialogTitle = '新增'
      this.addNum = 0 // 本人
    },
    freeAdd1() {
      this.showDialog = true
      this.dialogTitle = '新增'
      this.addNum = 1 // 他人
    },
    haddleEdit() {
      if (this.multipleSelection.length != 1) {
        this.$toast.fail('请选择一条数据进行修改!')
        // this.$notify({ type: 'danger', message: '请选择一条数据进行修改!' });
      } else {
        this.tableFrom = this.multipleSelection[0]
        this.showDialog = true
        this.dialogTitle = '修改'
        this.addNum = 0 // 本人
      }
    },
    haddleEdit1() {
      if (this.multipleSelection1.length != 1) {
        this.$toast.fail('请选择一条数据进行修改!')
        // this.$notify({ type: 'danger', message: '请选择一条数据进行修改!' });
      } else {
        this.tableFrom = this.multipleSelection1[0]
        this.showDialog = true
        this.dialogTitle = '修改'
        this.addNum = 1 // 他人
      }
    },
    saveBtn() {
      if (this.tableFrom.XM && this.tableFrom.SFZH && this.tableFrom.phone) {
        if (this.addNum == 0) {
          this.tableData.push(this.tableFrom)
          this.tableData = Array.from(new Set(this.tableData))
        } else {
          this.tableData1.push(this.tableFrom)
          this.tableData1 = Array.from(new Set(this.tableData1))
        }
        this.cancelBtn()
      } else {
        this.$toast.fail('请填写必填项!')
        // this.$notify({ type: 'waring', message: '请填写必填项!' });
      }
    },
    cancelBtn() {
      this.tableFrom = {
        name: '',
        sfzh: '',
        iphone: '',
        jtdz: '',
      }
      this.showDialog = false
    },
    // 保存表格数据
    getTableData: async function () {
      let tableDatas = []
      if (this.nowIndex == 0) {
        tableDatas = this.tableData
      } else {
        tableDatas = this.tableData1
      }
      tableDatas.forEach((item) => {
        item.To_row_guid = this.$store.state.toGuid.row_guid
      })
      let params = {
        dataGuid: '851cbf77-b4e9-46f0-9e99-b710e3cc5db4', //a9125fd3-4d34-4732-b722-76dc06e6b38c
        strParams: JSON.stringify(tableDatas),
      }
      let params1 = {
        accessCode: '0fb3f6123d1b4fe6851c99532c463f6f',

        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: params,
      }
      const res = await QuerySignCallback(params1)
      //保存失败要终止
      if (!JSON.parse(res.data.data).Success) {

        this.isTable = false
        this.$toast.fail('保存失败')
        return false
      } else {
        this.isTable = true
        return true
      }
    },
    //调用存储过程获取农户建房数量
    getProcedure: async function () {
      //判断他人代办身份证号码填写问题
      if (this.nowIndex == 1 && !this.formDataTR.certificatecode == '' && this.validator(this.formDataTR.certificatecode)) {
      } else if (this.nowIndex == 1) {
        this.$toast.fail('请填写正确的农户身份证号码!')
        return false
      }
      if (this.nowIndex == 1) {
        var res2 = await existHouse(this.formDataTR.certificatecode)
      } else {
        var res2 = await existHouse(window.localStorage.getItem('DanDianid'))
      }
      try {
        let data = res2.data.data
        if (!data) {

          this.$toast.fail('系统检测到您已发起过建房申请，请勿重复提交。')
        } else {
          //添加节流函数
          this.BtnSaveFormData()
        }
      } catch (err) {

        //添加节流函数
        this.$toast.fail('系统检测到您已发起过建房申请，请勿重复提交。')
        // this.BtnSaveFormData()
      }
    },
    BtnSaveFormData: async function () {
      let formData = {}
      var date = new Date()
      var year = date.getFullYear() //获取当前年份
      let aaa = 0
      if ((this.If_ljf1 == '是' || this.If_ljf == '是') && this.tableData.length == 0 && this.tableData1.length == 0) {
        this.$toast.fail('请新增联建人')
        return
      }
      if (this.valueCun3) {
        this.formData.S = this.ValueCity3
        this.formData.X = this.valueXian3
        this.formData.town = this.valueZhen3
        this.formData.CUN = this.valueCun3
      }
      //获取流水号
      let data12 = this.nowIndex == 0 ? this.formData.CUN : this.formDataTR.CUN
      let params11 = {
        appKey: '6738b790-69e8-11ec-a673-6805cab640z1',
        accessCode: 'b03be941dc27498ebcc46311330ee97d',
        keyType: '3',
        numPrefix: 'SPJF-' + data12, //SPJF-村级citycode
        year: year, //当前年份
      }
      const res11 = await numGenerateGetNum(params11)
      var lsh = ''
      if (res11.data.code == 200) {
        lsh = res11.data.data
      }
      if (this.nowIndex == 0) {
        if (
          this.formData.houseapplicant == '' ||
          this.formData.houseapplicant == 'null' ||
          this.formData.certificatecode == '' ||
          this.formData.certificatecode == 'null' ||
          this.formData.applyphone == '' ||
          this.formData.applyphone == 'null' ||
          this.formData.S == '' ||
          this.formData.S == 'null' ||
          this.formData.X == '' ||
          this.formData.X == 'null' ||
          this.formData.town == '' ||
          this.formData.town == 'null' ||
          // this.formData.CUN==''||this.formData.CUN=='null' ||
          this.formData.buildtype == '' ||
          this.formData.buildtype == 'null' ||
          this.formData.buildreason == '' ||
          this.formData.buildreason == 'null' ||
          this.formData.If_ljf == '' ||
          this.formData.If_ljf == 'null'
        ) {
          this.$toast.fail('请输入必选项！')
          // this.$notify({
          //   type: "danger",
          //   message: "请输入必选项！",
          // });
        } else {
          //清除*号数据
          //点击下一步的时候需要判断姓名和身份证号码是否匹配
          this.formData.houseapplicant = window.localStorage.getItem('DanDianName') || this.formData.houseapplicant
          this.formData.certificatecode = window.localStorage.getItem('DanDianid') || this.formData.certificatecode
          this.formData.applyphone = window.localStorage.getItem('DanDianPhone') || this.formData.applyphone
          // this.handleMatching(this.formData.certificatecode,this.formData.houseapplicant)
          this.isGOTo1 = true
          setTimeout(async () => {
            if (this.isGOTo1) {
              formData = JSON.parse(JSON.stringify(this.formData))
              aaa = 35
              //   let uuid1 = uuidv4()
              formData.row_guid = this.$store.state.toGuid.row_guid
              this.$store.commit('getUUID', this.$store.state.toGuid.row_guid)
              formData.buildreason =
                this.formData.buildreason == '住房条件改善'
                  ? 65
                  : this.formData.buildreason == '分户新建住房'
                    ? 64
                    : this.formData.buildreason == '原址改、扩、翻建住房'
                      ? 71
                      : this.formData.buildreason == '按照规划迁址新建住房'
                        ? 72
                        : 73
              formData.SBZT = '已提交'
              var date = new Date()
              var year = date.getFullYear() //获取当前年份
              var mon = date.getMonth() + 1 //获取当前月份
              var da = date.getDate() //获取当前日
              var day = date.getDay() //获取当前星期几
              var h = date.getHours() //获取小时
              var m = date.getMinutes() //获取分钟
              var s = date.getSeconds() //获取秒
              var d = document.getElementById('Date')
              var time1 = year + '-' + mon + '-' + da + '-' + h + ':' + m + ':' + s
              formData.NHID = window.localStorage.getItem('userId')
              formData['SQFS'] = aaa
              formData.lsh = lsh
              formData.applytime = time1
              formData.address = this.ValueCity + this.valueXian + this.valueZhen + this.valueCun
              if (this.buildtype == '异址新建') {
                formData.SCITY = this.formData.S
                formData.XCITY = this.formData.X
                formData.SSZZ = this.formData.town
                formData.VILLAGE = this.formData.CUN
              }
              let params = {
                accessCode: '0fb3f6123d1b4fe6851c99532c463f6f',

                cityCode: window.localStorage.getItem('citycode')
                  ? window.localStorage.getItem('citycode')
                  : '441300000000',
                params: {
                  dataGuid: '01103ebf-a884-4282-b996-78dd64196946',
                  strParams: JSON.stringify([formData]),
                },
              }
              this.$store.commit('getParams', params)
              //注册接口
              /**
               * 警告不要随意更改注册用户的信息
               */
              // let pae = {
              //   username: window.localStorage.getItem('DanDianName'), //用户
              //   loginName: window.localStorage.getItem('DanDianPhone'),
              //   userId: window.localStorage.getItem('userId1'),
              //   cityCode: this.formData.CUN, //村citycode
              //   idNum: window.localStorage.getItem('DanDianid'), //身份证号
              //   phone: this.formData.applyphone,
              //   roleType: '7',
              //   userType: '3',
              //   buildType: 0,
              // }
              // if (this.buildtype == '异址新建') {
              //   pae.buildType = 1
              // }
              //先判断当前账户是否已注册
              window.localStorage.setItem('citycode', this.formData.CUN)
              // const data1 = await getRegister1(pae)
              // if (data1.data.code == 200) {
              // window.localStorage.setItem('token', data1.data.data.token)
              // let code1 =
              //   data1.data.data.userInfo.districtCode !== null
              //     ? data1.data.data.userInfo.districtCode.slice(0, 4) + '00000000'
              //     : '441300000000'
              // window.localStorage.setItem('ISZHUCE', data1.data.data.userInfo.bizUserId)
              // window.localStorage.setItem('userId', data1.data.data.userInfo.bizUserId)
              // window.localStorage.setItem('userName', data1.data.data.userInfo.aliasName)
              if (this.If_ljf1 == '是' || this.If_ljf == '是') {
                let a = await this.getTableData()
                console.log(a, 'Baocun')
                if (!a) {
                  this.$toast.fail('联建人保存失败')
                  return;
                }
              }
              let fromDataArr = []
              let build = ''
              this.JFLYcolumns.forEach((item) => {
                if (this.formData.buildreason == item.enumname) {
                  build = item.enumvalue
                }
              })
              fromDataArr.push({
                ValueCity: this.ValueCity,
                valueXian: this.valueXian,
                valueZhen: this.valueZhen,
                valueCun: this.valueCun,
                buildtypeName: this.buildtype,
                buildreason: build,
              })
              this.$store.commit('gettoGuid', formData)
              setTimeout(() => {
                this.$router.push({
                  path: '/qianming',
                  query: {
                    data1: formData,
                    formData: fromDataArr,
                  },
                })
              }, 500)
              // } else {
              //   this.$toast.fail('用户注册失败请重试')
              //   return
              // }

            }
          }, 500)
        }
        // }
        // }
        // }
      } else {
        //判断当前选择的地市和用户所在地市是否一致
        console.log(this.formDataTR, 'this.formDataTR')
        if (
          this.formDataTR.houseapplicant == '' ||
          this.formDataTR.houseapplicant == 'null' ||
          this.formDataTR.certificatecode == '' ||
          this.formDataTR.certificatecode == 'null' ||
          // this.formDataTR.applyphone == '' ||
          // this.formDataTR.applyphone == 'null' ||
          this.formDataTR.S == '' ||
          this.formDataTR.S == 'null' ||
          this.formDataTR.X == '' ||
          this.formDataTR.X == 'null' ||
          this.formDataTR.town == '' ||
          this.formDataTR.town == 'null' ||
          // this.formDataTR.CUN==''||this.formDataTR.CUN=='null' ||
          this.formDataTR.buildtype == '' ||
          this.formDataTR.buildtype == 'null' ||
          this.formDataTR.buildreason == '' ||
          this.formDataTR.buildreason == 'null' ||
          this.formDataTR.If_ljf == '' ||
          this.formDataTR.If_ljf == 'null' ||
          this.fileList.length == 0 ||
          this.fileList1.length == 0
        ) {
          this.$toast.fail('请输入必选项！')
          // this.$notify({
          //   type: "danger",
          //   message: "请输入必选项！",
          // });
        } else {
          // if (
          //   window.localStorage.getItem('token') != 'null' &&
          //   window.localStorage.getItem('citycode') &&
          //   window.localStorage.getItem('citycode') != this.formDataTR.S
          // ) {
          //   this.$toast.fail('暂不支持跨地市办理建房申请')
          // } else {
          //先上传文件
          // if (!/^1[3456789]\d{9}$/.test(this.formDataTR.applyphone)) {
          //   this.$toast.fail('手机号码不合法，请重新输入')
          //   return false
          // }
          if (
            !/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(
              this.formDataTR.certificatecode
            )
          ) {
            this.$toast.fail('身份证号码不合法，请重新输入')
            return false
          }
          //判断当前农户输入的手机号和代办人的手机号是否一样
          if (this.formDataTR.applyphone == window.localStorage.getItem('DanDianPhone')) {
            this.$toast.fail('农户和代办人的手机号相同，请重新填写')
            return false
          }
          this.formDataTR.DBRXM = window.localStorage.getItem('DanDianName') || this.formDataTR.DBRXM
          this.formDataTR.dbrsfzh = window.localStorage.getItem('DanDianid') || this.formDataTR.dbrsfzh
          this.formDataTR.dbrsjh = window.localStorage.getItem('DanDianPhone') || this.formDataTR.dbrsjh
          //温州和台州不需要查询代办人信息
          let isFangxing = true
          debugger
          if(this.ValueCity1 == '温州市' || this.ValueCity1 == '台州市'){
            isFangxing = true
          } else {
            isFangxing = false
            this.handleMatching(this.formDataTR.certificatecode, this.formDataTR.houseapplicant)
          }
          // this.handleMatching1(this.formDataTR.dbrsfzh,this.formDataTR.DBRXM)
          setTimeout(async () => {
            if (this.isGOTo1 || isFangxing) {
              formData = JSON.parse(JSON.stringify(this.formDataTR))
              aaa = 36
              //   let uuid1 = uuidv4()
              formData.row_guid = this.$store.state.toGuid.row_guid
              formData.buildreason =
                this.formDataTR.buildreason == '住房条件改善'
                  ? 65
                  : this.formDataTR.buildreason == '分户新建住房'
                    ? 64
                    : this.formDataTR.buildreason == '原址改、扩、翻建住房'
                      ? 71
                      : this.formDataTR.buildreason == '按照规划迁址新建住房'
                        ? 72
                        : 73
              var date = new Date()
              var year = date.getFullYear() //获取当前年份
              var mon = date.getMonth() + 1 //获取当前月份
              var da = date.getDate() //获取当前日
              var day = date.getDay() //获取当前星期几
              var h = date.getHours() //获取小时
              var m = date.getMinutes() //获取分钟
              var s = date.getSeconds() //获取秒
              var d = document.getElementById('Date')
              var time1 = year + '-' + mon + '-' + da + '-' + h + ':' + m + ':' + s
              formData.NHID = window.localStorage.getItem('userId')
              formData['SQFS'] = aaa
              formData.SBZT = '已提交'
              formData.lsh = lsh
              formData.applytime = time1
              formData.address = this.ValueCity1 + this.valueXian1 + this.valueZhen1 + this.valueCun1
              if (this.buildtype1 == '异址新建') {
                formData.SCITY = this.formDataTR.S
                formData.XCITY = this.formDataTR.X
                formData.SSZZ = this.formDataTR.town
                formData.VILLAGE = this.formDataTR.CUN
              }
              let params = {
                accessCode: '0fb3f6123d1b4fe6851c99532c463f6f',
                cityCode: window.localStorage.getItem('citycode')
                  ? window.localStorage.getItem('citycode')
                  : '441300000000',
                params: {
                  dataGuid: '01103ebf-a884-4282-b996-78dd64196946',
                  strParams: JSON.stringify([formData]),
                },
              }
              //   const res1 = await InsertDataView(params)
              this.$store.commit('getParams', params)
              //   if (res1.data.Success == true) {
              // let pae1 = {
              //   username: this.formDataTR.houseapplicant, //用户
              //   loginName: this.formDataTR.applyphone,
              //   cityCode: this.formDataTR.CUN, //村citycode
              //   idNum: this.formDataTR.certificatecode, //身份证号
              //   phone: this.formDataTR.applyphone,
              //   roleType: '7',
              //   userType: '3',
              //   buildType: 0,
              // }
              // if (this.buildtype1 == '异址新建') {
              //   pae1.buildType = 1
              // }
              /**
               * 警告不要随意更改注册用户的信息
               */
              // let pae2 = {
              //   username: window.localStorage.getItem('DanDianName'), //用户
              //   loginName: window.localStorage.getItem('DanDianPhone'),
              //   cityCode: this.formDataTR.CUN, //村citycode
              //   idNum: window.localStorage.getItem('DanDianid'), //身份证号
              //   phone: window.localStorage.getItem('DanDianPhone'),
              //   roleType: '7',
              //   userType: '3',
              //   buildType: 0,
              // }
              // if (this.buildtype1 == '异址新建') {
              //   pae2.buildType = 1
              // }
              // const data2 = await getRegister1(pae1)
              // if (data2.data.code != 200) {
              //   this.$toast.fail('农户注册失败')
              //   return
              // }
              //先判断当前账户是否已注册
              window.localStorage.setItem('citycode', this.formDataTR.CUN)
              // const data1 = await getRegister1(pae2)
              //将农户推送到eca
              if (this.If_ljf1 == '是' || this.If_ljf == '是') {
                let a = await this.getTableData()
                console.log(a, 'Baocun')
                if (!a) {
                  this.$toast.fail('联建人保存失败')
                  return;
                }
              }
              if (this.shangchuanS) {
                this.scsfz0File ? this.getFileServerUpload(this.scsfz0File, '0') : ''
                this.scsfzFile ? this.getFileServerUpload(this.scsfzFile, 'scsfz') : ''
                this.scsfz1File ? this.getFileServerUpload(this.scsfz1File, '1') : ''
              }
              this.$store.commit('gettoGuid', formData)
              let fromDataArr = []
              fromDataArr.push({
                ValueCity: this.ValueCity1,
                valueXian: this.valueXian1,
                valueZhen: this.valueZhen1,
                valueCun: this.valueCun1,
                buildtype1: this.buildtype1,
                buildtypeName: this.buildtype1,
                buildreason: this.formDataTR.buildreason,
              })
              //   this.$store.commit('gettoGuid', formData)
              this.$store.commit('gettoGuid1', fromDataArr)
              setTimeout(() => {
                this.$router.push({
                  path: '/daiban',
                  query: {
                    //   data2: res.data.SendData,
                    data1: formData,
                    formData: fromDataArr,
                  },
                })
              }, 500)
            }
          }, 500)
        }
        // }
      }
    },
    getUpadatefun1: async function () {
      // let paerssend2 = {
      //   procName: 'up_query',
      //   dtParams: JSON.stringify([{ I_USERID: "'" + this.formDataGJ.GJZJH + "'", I_TYPE: 12 }]),
      //   token: window.localStorage.getItem('token'),
      // }
      // let paramsendMEssage2 = {
      //   accessCode: '69db6bece3a7480592e2ec753d1e335e',
      //   cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
      //   params: paerssend2,
      // }
      // const reqwmsg2 = await QuerySignCallback(paramsendMEssage2)
      const res = await GJDBFunction1('CRAFTSMAN', this.formDataGJ.GJZJH, 4)
      if (res) {
        if (JSON.parse(reqwmsg.data.data).Data[0].SEARCH == 0) {
          this.Canshu == 1
        } else {
          this.Canshu == 0
        }
      }
    },
    SaveGJ: async function () {
      //被代办的工匠年龄不能小于45岁
      const ages = idCard(this.formDataGJ.GJZJH, 3)
      if (ages <= 45) return this.$toast.fail('工匠的年龄小于45周岁，暂不支持代办')
      var formData = {}
      if (
        this.formDataGJ.GJSJH == '' ||
        this.formDataGJ.GJSJH == 'null' ||
        this.formDataGJ.GJZJH == '' ||
        this.formDataGJ.GJZJH == 'null' ||
        this.formDataGJ.GJXM == '' ||
        this.formDataGJ.GJXM == 'null' ||
        this.formDataGJ.GJDBRXM == '' ||
        this.formDataGJ.GJDBRXM == 'null' ||
        this.formDataGJ.GJDBRLXDH == '' ||
        this.formDataGJ.GJDBRLXDH == 'null' ||
        this.formDataGJ.GJDBRZJH == '' ||
        this.formDataGJ.GJDBRZJH == 'null' ||
        this.formDataGJ.XCITY == '' ||
        this.formDataGJ.XCITY == 'null' ||
        this.formDataGJ.ZCITY == '' ||
        this.formDataGJ.ZCITY == 'null' ||
        this.formDataGJ.SCITY == '' ||
        this.formDataGJ.SCITY == 'null' ||
        this.formDataGJ.CCITY == '' ||
        this.formDataGJ.CCITY == 'null' ||
        this.fileList.length == 0 ||
        this.fileList1.length == 0
      ) {
        this.$toast.fail('请输入必选项！')
      } else {
        this.formDataGJ.GJDBRXM = window.localStorage.getItem('DanDianName') || this.formDataGJ.GJDBRXM
        this.formDataGJ.GJDBRZJH = window.localStorage.getItem('DanDianid') || this.formDataGJ.GJDBRZJH
        this.formDataGJ.GJDBRLXDH = window.localStorage.getItem('DanDianPhone') || this.formDataGJ.GJDBRLXDH
        formData = JSON.parse(JSON.stringify(this.formDataGJ))

        //先判断当前账户是否已注册
        // //将农户推送到eca
        // var reqwmsg = await QuerySignCallback(paramsendMEssage)
        const reqwmsg = await GJDBFunction3('CRAFTSMAN', this.formDataGJ.GJZJH, 4)
        if (reqwmsg[0]) {
          //获取当前行数据
          // let paerssend2 = {
          //   procName: 'up_query',
          //   dtParams: JSON.stringify([
          //     {
          //       I_USERID: JSON.parse(reqwmsg.data.data).Data[0].ST_ID,
          //       I_TYPE: 13,
          //     },
          //   ]),
          //   token: window.localStorage.getItem('token'),
          // }
          // let paramsendMEssage2 = {
          //   accessCode: '69db6bece3a7480592e2ec753d1e335e',
          //   cityCode: window.localStorage.getItem('citycode')
          //     ? window.localStorage.getItem('citycode')
          //     : '441300000000',
          //   params: paerssend2,
          // }
          // const reqwmsg2 = await QuerySignCallback(paramsendMEssage2)
          const reqwmsg2 = await GJDBFunction3('CRAFTSMAN', this.formDataGJ.GJZJH, 4)
          if (reqwmsg2.length > 0) {
            //获取到当前可选择的数据列表
            window.sessionStorage.setItem('LISTGJ', JSON.stringify(reqwmsg2))
            this.showList = true
          } else {
            this.$toast.fail(`暂无数据可代办`)
          }
        } else {
          this.$toast.fail('工匠暂无待办件')
        }
        formData.TO_ROW_GUID = ''
        window.sessionStorage.setItem('formDataGJ', JSON.stringify([formData]))
        // }
        if (JSON.parse(reqwmsg.data.data).Data[0]) {
          //获取当前行数据
          // let paerssend2 = {
          //   procName: 'up_query',
          //   dtParams: JSON.stringify([
          //     {
          //       I_USERID: JSON.parse(reqwmsg.data.data).Data[0].ST_ID,
          //       I_TYPE: 13,
          //     },
          //   ]),
          //   token: window.localStorage.getItem('token'),
          // }
          // let paramsendMEssage2 = {
          //   accessCode: '69db6bece3a7480592e2ec753d1e335e',
          //   cityCode: window.localStorage.getItem('citycode')
          //     ? window.localStorage.getItem('citycode')
          //     : '441300000000',
          //   params: paerssend2,
          // }
          // const reqwmsg2 = await QuerySignCallback(paramsendMEssage2)
          const reqwmsg2 = await GJDBFunction1('CRAFTSMAN', JSON.parse(reqwmsg.data.data).Data[0].ST_ID, 4)
          if (reqwmsg2.length > 0) {
            //获取到当前可选择的数据列表
            window.sessionStorage.setItem('LISTGJ', JSON.stringify(reqwmsg2))
            this.showList = true
          } else {
            this.$toast.fail(`暂无数据可代办`)
          }
        }
        formData.TO_ROW_GUID = ''
        window.sessionStorage.setItem('formDataGJ', JSON.stringify([formData]))
      }
    },
    delectFile: async function (file) {
      let fileguid = ''
      if (file.ROW_GUID) {
        fileguid = file.ROW_GUID
      } else {
        fileguid = this.fileGuid
      }
      if (fileguid) {
        let params = {
          accessCode: 'ce9b691634de4ebca68dc5bb638d07f4',
          cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
          params: {
            fileGuid: fileguid,
            token: window.localStorage.getItem('token'),
          },
        }
        const res = await FileServerProxy(params)
        let data = JSON.parse(res.data.data).Success
        if (data) {
          this.$toast.success('删除成功!')
        }
      }
    },
    isEmpty(value) {
      if (value === null) {
        return false
      }
      switch (typeof value) {
        case 'undefined':
          return true
        case 'number':
          return isNaN(value)
        case 'string':
          return value.trim() === ''
        case 'object':
          var countKeys = Object.keys(value).length
          return countKeys < 1
        default:
          return false
      }
    },
    getCityOpenDataView: async function () {
      this.CityColumns = []
     const res = await getDatalistForTree('330000000000')
      this.CityColumns = res.data.data
      this.CityColumns.forEach((item) => {
        if (item.citycode == window.localStorage.getItem('citycode')) {
          this.cityCode = item.citycode
          this.ValueCity = item.cityname
          this.ValueCity1 = item.cityname
          this.formData.S = item.citycode
          this.formDataTR.S = item.citycode
          this.formDataGJ.SCITY = item.citycode
          this.showPickerC = false
        }
        // this.getXianOpenDataView(window.localStorage.getItem('citycode'))
      })
      if (this.formData.S) {
        this.CityColumns.forEach((item) => {
          if (item.citycode == this.formData.S) {
            this.cityCode = item.citycode
            this.ValueCity = item.cityname
            this.formData.S = item.citycode
          }
        })
        this.getXianOpenDataView(this.formData.S)
      } else if (this.formDataTR.S) {
        this.CityColumns.forEach((item) => {
          if (item.citycode == this.formDataTR.S) {
            this.cityCode = item.citycode
            this.ValueCity1 = item.cityname
            this.formDataTR.S = item.citycode
          }
        })
        this.getXianOpenDataView(this.formDataTR.S)
      }
    },
    getXianOpenDataView: async function (data) {

      this.XianColumns = []
      const res = await getDatalistForTree(data)
      this.XianColumns = res.data.data

         if (this.formData.X) {
          this.getTownOpenDataView(this.formData.X)
          this.XianColumns.forEach(ite => {
            if (ite.citycode == this.formData.X) {
              this.valueXian = ite.cityname
            }
          })
        } else if (this.formDataTR.X) {
          this.getTownOpenDataView(this.formDataTR.X)
          this.XianColumns.forEach(ite => {
            if (ite.citycode == this.formDataTR.X) {
              this.valueXian1 = ite.cityname
            }
          })
        }
      // var p = {
      //   "accessCode": "13120772696d11ed8d0f2cf05de0e487",
      //   "cityCode": data,
      //   "params": {
      //     "cityCode": data,
      //     "isLazy": 1
      //   }
      // }
      // const res = await FileServerProxy(p);
      // const JsonData = JSON.parse(res.data.data);
      // console.log(JsonData);
      // if (JsonData.data) {
      //   JsonData.data.forEach((item) => {
      //     var p = {};
      //     p.citycode = item.extraInfo.DEPT_CODE;
      //     p.cityname = item.name;
      //     this.XianColumns.push(p);
      //   })
      //   if (this.formData.X) {
      //     this.getTownOpenDataView(this.formData.X)
      //     this.XianColumns.forEach(ite => {
      //       if (ite.citycode == this.formData.X) {
      //         this.valueXian = ite.cityname
      //       }
      //     })
      //   } else if (this.formDataTR.X) {
      //     this.getTownOpenDataView(this.formDataTR.X)
      //     this.XianColumns.forEach(ite => {
      //       if (ite.citycode == this.formDataTR.X) {
      //         this.valueXian1 = ite.cityname
      //       }
      //     })
      //   }
      // }
    },
    getTownOpenDataView: async function (data) {
      this.TownColumns = [];
      //   //换成部门
    //    var ptown={
    //           "accessCode": "13120772696d11ed8d0f2cf05de0e487",
    //           "cityCode": data,
    //           "params": {
    //           "cityCode": data,
    //           "isLazy":1
    //                   }
    //              }
    //       const restown=await FileServerProxy(ptown);
    //       const JsonDatatown=JSON.parse(restown.data.data);
    //       if(JsonDatatown.data){
    //         JsonDatatown.data.forEach((item)=>{
    //           var  p={};
    //           p.citycode=item.extraInfo.DEPT_CODE;
    //           p.cityname=item.name;
    //           this.TownColumns.push(p);
    //         })
    //       }
      const res = await getDatalistForTree(data)
      this.TownColumns = res.data.data
      if (this.formData.town) {
        this.getCunOpenDataView(this.formData.town)
        this.TownColumns.forEach(ite => {
          if (ite.citycode == this.formData.town) {
            this.valueZhen = ite.cityname
          }
        })
      }
      if (this.formDataTR.town) {
        this.getCunOpenDataView(this.formDataTR.town)
        this.TownColumns.forEach(ite => {
          if (ite.citycode == this.formDataTR.town) {
            this.valueZhen1 = ite.cityname
          }
        })
      }
    },
    getCunOpenDataView: async function (data) {
      this.CunColumns = []
    //   var pCun={
    //         "accessCode": "13120772696d11ed8d0f2cf05de0e487",
    //         "cityCode": data,
    //         "params": {
    //         "cityCode": data,
    //         "isLazy":1
    //                 }
    //            }
    //     const resCun=await FileServerProxy(pCun);
    //     const JsonDataCun=JSON.parse(resCun.data.data);
    //     if(JsonDataCun.data){
    //       JsonDataCun.data.forEach((item)=>{
    //         var  p={};
    //         p.citycode=item.extraInfo.DEPT_CODE;
    //         p.cityname=item.name;
    //         this.CunColumns.push(p);
    //       })
    //     }
      // const res = await FileServerProxy(pCun)
      // this.CunColumns = JSON.parse(res.data.data).data
      // this.CunColumns.forEach(ite => {
      //   if (ite.DEPT_CODE == this.formData.CUN) {
      //     this.valueCun = ite.name
      //   }
      // })
      const res = await getDatalistForTree(data)
      this.CunColumns = res.data.data
      this.CunColumns.forEach(ite => {
        if (ite.citycode == this.formData.CUN) {
          this.valueCun = ite.cityname
        }
      })
      if (this.formData.CUN) {
       // this.getCunOpenDataView(this.formData.town)
        this.CunColumns.forEach(ite => {
          if (ite.citycode == this.formData.CUN) {
            this.valueCun = ite.cityname
          }
        })
      }
      if (this.formDataTR.CUN) {
        this.CunColumns.forEach(ite => {
          if (ite.citycode == this.formDataTR.CUN) {
            this.valueCun1 = ite.name
          }
        })
      }
    },
    getJFLYOpenDataView: async function () {
      this.JFLYcolumns = []
      let params = {
        groupNames: ['YWXT_ZJS_GROUP_JFLY'],
      }
      const res = await getDataEnumByGroupName(params)
      this.JFLYcolumns = res.data.data[0].gsaDataEnumList
      if (this.formData.buildreason || this.formDataTR.buildreason) {
        this.JFLYcolumns.forEach(item => {
          if (item.enumvalue == this.formData.buildreason) {
            this.formData.buildreason = item.enumname
          }
          if (item.enumvalue == this.formDataTR.buildreason) {
            this.formDataTR.buildreason = item.enumname
          }
        })
      }
    },
    getBUILDTYPEcolumns: async function () {
      this.BUILDTYPEcolumns = []
      let params = {
        groupNames: ['YWXT_ZJS_GROUP_JFLX'],
      }
      const res = await getDataEnumByGroupName(params)
      var newData = res.data.data[0].gsaDataEnumList
      if (this.$store.state.NowName != '改扩建') {
        newData.forEach((item) => {
          if (item.enumname != '改扩建') {
            this.BUILDTYPEcolumns.push(item)
          }
        })
      } else {
        this.BUILDTYPEcolumns.push(newData[1])
      }
    },
    getcolumns1: async function () {
      this.columns1 = []
      let params = {
        groupNames: ['YWXT_ZJS_GROUP_SFLJ'],
      }
      const res = await getDataEnumByGroupName(params)
      this.columns1 = res.data.data[0].gsaDataEnumList
      if (this.formData.If_ljf || this.formDataTR.If_ljf) {
        this.columns1.forEach(item => {
          if (this.formData.If_ljf == item.enumvalue) {
            this.If_ljf = item.enumname
          }
          if (this.formDataTR.If_ljf == item.enumvalue) {
            this.If_ljf1 = item.enumname
          }
        })
      }
    },
    onClickLeft() {
      this.$router.push({
        path: '/ZLJIndex',
      })
    },
    onConfirmCity(value) {
      this.cityCode = value.citycode
      this.ValueCity = value.cityname
      // this.formData.S_CITYNAME = value.CITYNAME;
      // this.formData.S_CITYNAME = value.CITYCODE;
      this.formData.S = value.citycode
      this.showPickerC = false
      this.getXianOpenDataView(value.citycode)
    },
    onConfirmCity1(value) {
      this.cityCode = value.citycode
      this.ValueCity1 = value.cityname
      this.formDataTR.S = value.citycode
      this.formDataGJ.SCITY = value.citycode
      this.showPickerC = false
      this.getXianOpenDataView(value.citycode)
    },
    onConfirmXian(value) {
      this.valueXian = value.cityname
      // this.formData.X_CITYNAME = value.CITYNAME;
      // this.formData.X_CITYNAME = value.CITYCODE;
      this.formData.X = value.citycode
      this.showPickerX = false
      this.getTownOpenDataView(value.citycode)
    },
    onConfirmXian1(value) {
      this.valueXian1 = value.cityname
      this.formDataTR.X = value.citycode
      this.formDataGJ.XCITY = value.citycode
      this.showPickerX = false
      this.getTownOpenDataView(value.citycode)
    },
    onConfirmTown(value) {
      // this.formData.TOWN_CITYNAME = value.CITYNAME;
      this.valueZhen = value.cityname
      this.formData.town = value.citycode
      // this.formDataTR.town = value.CITYCODE;
      this.showPickerT = false
      this.getCunOpenDataView(value.citycode)
    },
    onConfirmTown1(value) {
      this.valueZhen1 = value.cityname
      this.formDataTR.town = value.citycode
      this.formDataGJ.ZCITY = value.citycode
      this.showPickerT = false
      this.getCunOpenDataView(value.citycode)
    },
    onConfirmCun(value) {
      this.valueCun = value.cityname
      // this.formData.CUN_CITYNAME = value.CITYNAME;
      this.formData.CUN = value.citycode
      this.formDataGJ.CCITY = value.citycode
      this.showPickerCun = false
    },
    onConfirmCun1(value) {
      this.valueCun1 = value.cityname
      this.formDataTR.CUN = value.citycode
      this.formDataGJ.CCITY = value.citycode
      this.showPickerCun = false
    },
    onConfirmBUILDTYPE(value) {
      this.buildtype = value.enumname
      // this.formData.BUILDTYPE_enumname = value.enumname;
      this.formData.buildtype = value.enumvalue
      this.showPickerBT = false
      //   if (value.enumname == '原址翻建') {
      //     this.JFLYcolumns = ['危房翻建']
      //   } else if (value.enumname == '异址新建') {
      //     this.JFLYcolumns = ['分户新建/无房新建', '按照规划迁址新建住房']
      //   }
    },
    onConfirmJFLY(value) {
      this.formData.buildreason = value.enumname
      this.showPickerJFLY = false
    },
    onConfirmJFLY1(value) {
      this.formDataTR.buildreason = value.enumname
      this.formDataGJ.buildreason = value.enumname
      this.showPickerJFLY1 = false
    },
    onConfirmBUILDTYPE1(value) {
      this.buildtype1 = value.enumname
      this.formDataTR.buildtype = value.enumvalue
      this.formDataGJ.buildtype = value.enumvalue
      this.showPickerBT = false
      //   if (value.enumname == '原址翻建') {
      //     this.JFLYcolumns = ['危房翻建']
      //   } else if (value.enumname == '异址新建') {
      //     this.JFLYcolumns = ['分户新建/无房新建', '按照规划迁址新建住房']
      //   }
    },
    onConfirm(value) {
      this.If_ljf = value.enumname
      // this.formData.IF_TDZ_enumname = value.enumname
      this.formData.If_ljf = value.enumvalue
      this.IsLG = value.enumname
      this.showPicker = false
    },
    onConfirm1(value) {
      this.If_ljf1 = value.enumname
      this.formDataTR.If_ljf = value.enumvalue
      this.formDataGJ.If_ljf = value.enumvalue
      // this.IsLG = value.enumname
      this.showPicker1 = false
    },
    tabClick(index) {
      this.nowIndex = index
    },
    handle1: async function (data, formData) {
      let parms = {
        wfGuid: '{9FF1C524-B55F-4A45-83B3-6EA46CF32092}',
        entityRowGuid: data,
      }
      const res = await PrepareCreateProcess(parms)
      //   this.sendData.push()
      //   let obj = {}
      //   res.data.SendData.forEach(item => {
      //     if (item.PTNID != -1&&item.) {
      //       obj = item
      //     }
      //   })
      //打开用户选择界面
      setTimeout(() => {
        this.$router.push({
          path: '/qianming',
          query: {
            data2: res.data.SendData,
            data1: data,
            formData: formData,
          },
        })
      }, 1000)
      this.handle2(data, res.data.SendData[1])
    },
    handle2: async function (data, data1) {
      let parms = {
        bizGuid: '53f76168-18bb-4ef9-96cf-70dbacd12000',
        wfGuid: '{9FF1C524-B55F-4A45-83B3-6EA46CF32092}',
        entityRowGuid: data,
      }
      const res = await CreateProcess(parms)
      //成功后调用3接口完成
      //   this.handle3(data, res.data.TaskId, data1);
    },
    // handle3: async function (data, data2, data1) {
    //   let parms = {
    //     taskId: data2,
    //     direction: 0,
    //     wfBoxGuid: '53f76168-18bb-4ef9-96cf-70dbacd12000',
    //     wfGuid: '{9FF1C524-B55F-4A45-83B3-6EA46CF32092}',
    //     sendNodes: JSON.stringify(data1),
    //     entityRowGuid: data,
    //
    //   }
    //   const res = await PlatSendTask(parms);
    // }
  },
  beforeRouteLeave(to, from, next) {
    if (to.name === 'qianMing' || to.name === 'daiban') {
      if (!from.meta.keepAlive) {
        from.meta.keepAlive = true // 当我们进入到C时开启对B页面的缓存
      }
      next()
    } else {
      from.meta.keepAlive = false
      this.$destroy() // 销毁B的实例
      next()
    }
  }
}
</script>
<style scoped lang="scss">
#ApplicationPage {
  font-family: "Helvetica Neue", Helvetica, STHeiTi, sans-serif;

  .bottomBtn {
    // height: 40px;
    width: 94.6%;
    background: #007aff;
    // line-height: 40px;
    text-align: center;
    color: #ffffff;
    font-weight: bold;
    margin: 0 10px;
  }

  .bottomText {
    height: 40px;
    line-height: 40px;
    background: #ffffff;
    text-align: center;
  }

  overflow: auto;
  background: #f6f6f6;

  /*font-size: 0.24rem;*/
  .title {
    width: 100%;
    height: 50px;
    background: #007aff;
    line-height: 50px;
    text-align: center;
    color: #ffffff;
    font-size: 20px;
    position: relative;
  }

  .top {
    height: 90px;
    background: #ffffff;
    margin-bottom: 20px;
    padding-top: 25px;
    text-align: center;

    .origin {
      width: 22px;
      height: 22px;
      background: #007aff;
      border-radius: 50%;
      display: inline-block;
    }

    .line {
      width: 20vw;
      /*height: 1px;*/
      border: 1px dashed #007aff;
      display: inline-block;
    }
  }

  .content {
    width: 100%;
    height: auto;
    overflow: auto;
    background: #ffffff;
    padding: 10px;

    .line {
      width: 6px;
      height: 26px;
      background: #007aff;
      display: inline-block;
    }

    .list ul li {
      min-height: 50px;
      line-height: 50px;
    }

    .tab {
      height: 40px;
      border-bottom: 1px solid #9b9b9b;

      ul li {
        width: 50%;
        height: 40px;
        line-height: 35px;
        float: left;
        text-align: center;
      }

      .select {
        color: #3f8ffc;
        border-bottom: 5px solid #3f8ffc;
      }
    }

    .tab1 {
      height: 30px;
      border-bottom: 1px solid #9b9b9b;

      ul li {
        width: 100%;
        height: 30px;
        line-height: 25px;
        float: left;
        text-align: center;
      }

      .select {
        color: #3f8ffc;
        border-bottom: 5px solid #3f8ffc;
      }
    }
  }

  /*position: relative;*/
  .file-list ul li {
    display: flex;
    /*justify-content: center;*/
    align-items: center;
    padding: 10px 0;
  }
}
</style>
<style lang="scss">
#ApplicationPage {
  .van-dialog__footer {
    background: transparent;
  }

  .el-form-item {
    width: 100% !important;
    margin-bottom: 0px !important;
    border-bottom: 1px solid #ccc;
  }

  .el-form-item__content {
    // width: 72% !important;
    text-align: right !important;
  }

  .el-form-item__label {
    /*font-size: 16px;*/
  }

  .van-field__label {
    width: auto !important;
  }

  .mediumFontSize {
    .van-field__label {
      font-size: 20px;
    }
  }

  .el-input__inner {
    /*font-size: 16px;*/
    text-align: right;
    border: none;
  }

  .van-cell:not(:last-child)::after {
    left: 0;
    // border-bottom: 1px solid rgb(210, 210, 210);
  }

  .van-cell::after {
    border-bottom: none;
  }

  .van-cell {
    padding: 20px 0 !important;
    font-size: 16px;
  }

  .van-picker {
    z-index: 9999 !important;
  }

  .van-field__control {
    text-align: right;
  }

  textarea {
    text-align: left !important;
  }

  .van-uploader__preview-image {
    width: 150px;
    height: 90px;
  }
}
</style>
<style>
.van-field__label {
  color: black !important;
  letter-spacing: 1px;
}

.van-cell {
  color: black;
}

.van-picker {
  z-index: 9999 !important;
}
</style>
